/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.emergency.bean;

import io.swagger.annotations.ApiModelProperty;

public class BaseQueryBean {
	/**
	 * 第几页
	 */
	@ApiModelProperty(value = "第几页",example = "1")
	private int page = 1;
	/**
	 * 每页条数
	 */
	@ApiModelProperty(value = "每页条数",example = "20")
	private int pageCount = 20;
	/**
	 * 数据条数
	 */
	@ApiModelProperty("数据条数")
	private int rowNumber;
	/**
	 * 总页数
	 */
	@ApiModelProperty("总页数")
	private int totalPage;
	/**
	 * 起始位置
	 */
	private int offset;
	
	/**
	 * 实验室ID
	 */
	private String laboratory;

	private String beginTime;
	private String endTime;

	public String getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	/**
	 * @return 获取第几页
	 */
	public int getPage() {
		return page;
	}

	/**
	 * @param page 设置第几页
	 */
	public void setPage(int page) {
		this.page = page<=0?1:page;
		this.offset =(page-1) * this.pageCount;
	}

	/**
	 * @return 获取每页条数
	 */
	public int getPageCount() {
		return pageCount;
	}

	/**
	 * @param pageCount 设置每页条数
	 */
	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
		this.totalPage = (rowNumber - 1) / pageCount + 1;
		this.offset =(page-1) * this.pageCount;
	}

	/**
	 * @return 获取数据条数
	 */
	public int getRowNumber() {
		return rowNumber;
	}

	/**
	 * @param rowNumber 设置数据条数
	 */
	public void setRowNumber(int rowNumber) {
		this.rowNumber = rowNumber;
		this.totalPage = (rowNumber - 1) / pageCount + 1;
	}

	/**
	 * @return 获取总页数
	 */
	public int getTotalPage() {
		return totalPage;
	}

	/**
	 * @param totalPage 设置总页数
	 */
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}

	/**
	 * @return 获取起始位置
	 */
	public int getOffset() {
		return offset;
	}

	public String getLaboratory() {
		return laboratory;
	}

	public void setLaboratory(String laboratory) {
		this.laboratory = laboratory;
	}
}
